﻿@model JaxaraRnD.Models.Objects.Order
@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>
<link href="@Url.Content("~/Content/themes/base/jquery.ui.datepicker.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('.date').datepicker({ dateFormat: "mm/dd/yy" });
    });
</script>
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Order</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.IssueDate)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.IssueDate)           
            @Html.ValidationMessageFor(model => model.IssueDate)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Staff, "Staff")
        </div>
        <div class="editor-field">
            @Html.DropDownList("Staffs", ViewBag.StaffId as SelectList)
            @Html.ValidationMessageFor(model => model.Staff)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Products)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Products, "Products")
            @Html.ValidationMessageFor(model => model.Products)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>